﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Go.Model;
using Go.Tools;

namespace GoUnitTest
{
    class MockComputerInteligencePlayOneMove : MockComputerPlayer
    {
        int moveCount;
        int _maxMove;

        public MockComputerInteligencePlayOneMove(LinkedList<Position> aListCoordinateToPlay, Color aColor, String name)
            : base(aListCoordinateToPlay, aColor, name)
        {
            moveCount = 0;
            _maxMove = 1;
        }


        public MockComputerInteligencePlayOneMove(LinkedList<Position> aListCoordinateToPlay, Color aColor, String name, int maxMove)
            : base(aListCoordinateToPlay, aColor, name)
        {
            moveCount = 0;
            _maxMove = maxMove;
        }

        //Si ya jugo una vez la inteligencia entonces FIN
        public override void play()
        {
            if (moveCount == _maxMove)
                throw new System.ArgumentException("FIN");

            if (_listCoordinatesToPlay.Count == 0)
            {
                moveCount++;
            }
            base.play();
        }

    }
}
